import 'package:flutter_test/flutter_test.dart';
import 'package:dankex_flutter_plugin/dankex_flutter_plugin.dart';
import 'package:dankex_flutter_plugin/dankex_flutter_plugin_platform_interface.dart';
import 'package:dankex_flutter_plugin/dankex_flutter_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockDankexFlutterPluginPlatform
    with MockPlatformInterfaceMixin
    implements DankexFlutterPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final DankexFlutterPluginPlatform initialPlatform = DankexFlutterPluginPlatform.instance;

  test('$MethodChannelDankexFlutterPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelDankexFlutterPlugin>());
  });

  test('getPlatformVersion', () async {
    DankexFlutterPlugin dankexFlutterPlugin = DankexFlutterPlugin();
    MockDankexFlutterPluginPlatform fakePlatform = MockDankexFlutterPluginPlatform();
    DankexFlutterPluginPlatform.instance = fakePlatform;

    expect(await dankexFlutterPlugin.getPlatformVersion(), '42');
  });
}
